package com.pz.cloud.framework.base.model;

import lombok.Data;

import java.util.HashSet;
import java.util.Set;

/**
 * 封装权限
 * @author 3hmzz
 */
@Data
public class BizAuthModel {
    protected Set<String> accountIds;
    protected Set<String> deptIds;
    protected Boolean isFilter = false;//是否开启权限过滤
    public void putAccountId(String... accountId){
        if(accountIds==null){
            accountIds = new HashSet<>();
        }
        for (String s : accountId) {
            accountIds.add(s);
        }
    }
    public void putDeptId(String... deptId){
        if(deptIds==null){
            deptIds = new HashSet<>();
        }
        for (String s : deptId) {
            deptIds.add(s);
        }
    }
}
